<div id="control_right" height:100%;>
<label><font face=宋体 color=#9932cc size=3>试题详细想信息</font></label>
<a href="/soj/php/manager/manager_contest_delete.php?no={? $contest_no?}" onClick="return confirm('真的要删除?')">删除</a>
<a href="/soj/php/manager/manager_contest_alter.php?no={? $contest_no?}" onClick="return confirm('删除会连同竞赛的试题队伍及队伍结果删除真的要删除真的要修改?')">修改</a>
<a href="/soj/php/manager/manager_contest_team.php?no={? $contest_no?}">查看队伍情况</a>
<div id="part1">
     {? $contest_no ?}:{? $name ?}<br><br>	  
			<fieldset>
				<legend>竞赛大纲</legend>
				<p>{? $summary ?}</p>
			</fieldset>
			<fieldset>
				<legend>报名开始时间</legend>
				<p>{? $sign_begin_time ?}</p>
			</fieldset>
			<fieldset>
				<legend>报名结束时间</legend>
				<p>{? $sign_begin_time ?}</p>
			</fieldset>
			
			<fieldset>
				<legend>比赛开始时间</legend>
				<p>{? $begin_time ?}</p>
			</fieldset>			
			<fieldset>
				<legend>结束时间</legend>
				<p>{? $end_time ?}</p>
			</fieldset>			
		
			<fieldset>
				<legend>答错题加时</legend>
				<p>{? $addtime ?}分钟</p>
			</fieldset>
			<fieldset>
				<legend>竞赛状态</legend>
				<p>{? $status ?}  
				{? if $status eq "no" ?}
				 未开启 no
				 {? else ?}
				   <a href="/soj/php/manager/manager_contest_change_status.php?no={? $no ?}&status=no">未开启 no</a>
				 {? /if ?}				 
				 
                 {? if $status eq "signstart" ?}注册开始 signstart
				 {? else ?}
				  <a href="/soj/php/manager/manager_contest_change_status.php?no={? $no ?}&status=signstart">注册开始 signstart</a>
				 {? /if ?}
                  {? if $status eq "signend" ?}注册结束 signend
				  {? else ?}
				   <a href="/soj/php/manager/manager_contest_change_status.php?no={? $no ?}&status=signend">注册结束 signend</a>
				  {? /if ?}
				  {? if $status eq "start" ?}竞赛开始 start
				  {? else ?}
				   <a href="/soj/php/manager/manager_contest_change_status.php?no={? $no ?}&status=start">竞赛开始 start</a>
				  {? /if ?}				
				  {? if $status eq "end" ?}竞赛结束 end
				  {? else ?}
				   <a href="/soj/php/manager/manager_contest_change_status.php?no={? $no ?}&status=end">竞赛开始 end</a>
				  {? /if ?}</p>
			</fieldset>		
			
</div>			
<div id="part2">
<fieldset>
<legend>竞赛试题
        <a href="/soj/php/manager/contest_add_problem.php?no={? $contest_no ?}">添加试题</a>
</legend>
{? if $isnotempty ?}{? * 如果有题目才显示*?}

 {?* 大于30个结果才会使用置顶的导航栏 *?}
	{? if $problem_num >= 30 ?}
	<div id="pager">
	{? $links ?}
	</div> 
  {? /if ?}
  <table bgcolor="#00CCCC">
   {? if $problem_num ?}
	<caption>Problems totle : {? $problem_num ?}</caption>
    {? /if ?}
   <tr>
       {?* 为了实现灵活性，第一个foreach显示所有的标题，这样即便结果集发生了变化，模板文件也不需要修改 *?}
	<tr>
	{? if $titles|@is_array ?}
			{? foreach key=key item=title from=$titles ?}
				{? if $title eq "problem_no" ?}
					<th class="problem_no_th">No.</th>
				{? else ?}
					{? if $title eq "best_user" ?}
						<th class="best_user_th">Best User</th>
					{? else ?}
						{? if $title eq "submit_count" ?}
						
							<th class="submit_count_th">Submit</th>
							
						{? else ?}
							
							{? if $title eq "ac_count" ?}
								
								<th class="ac_count_th">AC</th>							
							{? /if ?}
						{? /if ?}
					{? /if ?}
				{? /if ?}
			{? /foreach ?}
		{? else ?}
			{? "error" ?}
	{? /if ?}
        <th></th><th></th>
	</tr>
{?* 设置一个指示变量,用来生成条文表格 *?}
	{? assign var=spec value=0 ?}
	{? if $problems|@is_array ?}
		{? foreach key=key item=problem from=$problems ?}
			{? assign var=spec value=$spec+1 ?}
			
			<tr {? if $spec%2 eq 0 ?} class="spec" {? /if ?}>
				
				{? foreach key=key item=item from=$problem ?}
					{? if $key eq "problem_no" ?}
						{? assign var="no" value=$item ?}
					
						<td>{? $item ?}</td>
				
					{? else ?}
						{? if $key eq "title" ?}
						
							<td>{? $item ?}</td>
						
						{? else ?}
							
							{? if ($key eq "best_user") and !$item ?}
							
								<td>{? $item ?}</td>
							
							{? else ?}
								{? if $key eq "ac_count" ?}
									
									<td class="ac_count_td">{? $item ?}</td>
								
								{? else ?}

									{? if $key eq "submit_count" ?}
										
										<td class="submit_count_td">{? $item ?}</td>

									{? /if ?}		
								{? /if ?}
							{? /if ?}
						{? /if ?}
					{? /if ?}					
				{? /foreach ?}
				<td class="for manager"><a href="/soj/php/manager/manager_contest_problem_detail.php?no={? $no ?}">管理</a></td>
				<td class="for manager"><a href="/soj/php/manager/manager_contest_problem_delete.php?no={? $no ?}"  onClick="return confirm('真的要删除?')">删除</a></td>			
				</tr>
		
			{? /foreach ?}
		{? else ?}
			{? "error" ?}
	{? /if ?}
{? else ?}
暂时没有竞赛
{? /if ?}
</fieldset>
</div>
</div>